<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>预约登记查看</title>
	<meta name="decorator" content="default"/>
	<style type="text/css">
		.control-group {padding-bottom:20px;padding-top: 10px;}
		.tab-control-group {padding-bottom:5px;}
		.form-horizontal .control-label {
		  float: left;
		  width: 100px;
		  padding-top: 5px;
		  text-align: right;
		}
		.form-horizontal .controls {
		  *padding-right: 20px;
		  *display: inline-block;
		  margin-left: 110px;
		  *margin-left: 0;
		}
		.tab-detail-label {
		  padding-left:10px;
		  padding-right:5px;
		  width: 30px;
		  padding-top: 3px;
		  text-align: right;
		}
		.tab-controls {text-align:left;display:inline;}
		#memberDiv{margin-left: 100px;}
		#reason{
			margin-left:10px;
			margin-bottom:10px;
			width: 600px;
			height: 80px;
		}
	</style>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#name").focus();
			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				rules:{
	                "customerMobile": {
						isMobile: "#customerMobile"
	                }
	            },
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				},
				messages: {
					customerMobile:"手机号码格式有误！"
				}
			});
		});
	</script>
</head>
<body>
	<form:form id="inputForm" modelAttribute="storeReserve" action="${ctx}/cash/storeReserve/save" method="post" class="form-horizontal">
		<a href="${ctx}/cash/storeReserve/" data-role="button" data-inline="true">返回</a>
		<div data-role="fieldcontain">
			<label for="requestTime">登记时间:</label>
			<input type="text" id="requestTime" readonly="readonly" value="${fns:formatDate(storeReserve.requestTime, 'yyyy-MM-dd HH:mm:ss')}"/>
		</div>
		<div data-role="fieldcontain">
			<label for="reserveTime">来店时间:</label>
			<input type="text" id="reserveTime" readonly="readonly" value="${fns:formatDate(storeReserve.reserveTime, 'yyyy-MM-dd HH:mm:ss')}"/>
		</div>
		<div data-role="fieldcontain">
			<label for="employee">预约美容师:</label>
			<input type="text" id="employee" readonly="readonly" value="${storeReserve.employee.name}"/>
		</div>
        <c:if test="${empty storeReserve.member}">
	        <div data-role="fieldcontain">
				<label for="isMember">是否会员：</label>
				<input type="text" id="isMember" readonly="readonly" value="散客"/>
			</div>
	        <div data-role="fieldcontain">
				<label for="memberName">客户姓名:</label>
				<input type="text" id="memberName" readonly="readonly" value="${storeReserve.customerName}"/>
			</div>
	        <div data-role="fieldcontain">
				<label for="memberMobile">手机号码:</label>
				<input type="text" id="memberMobile" readonly="readonly" value="${storeReserve.customerMobile}"/>
			</div>
		</c:if>  
		<c:if test="${not empty storeReserve.member}">
	        <div data-role="fieldcontain">
				<label for="isMember">是否会员：</label>
				<input type="text" id="isMember" readonly="readonly" value="会员"/>
			</div>
	        <div data-role="fieldcontain">
				<label for="memberName">客户姓名:</label>
				<input type="text" id="memberName" readonly="readonly" value="${storeReserve.member.name}"/>
			</div>
	        <div data-role="fieldcontain">
				<label for="memberMobile">手机号码:</label>
				<input type="text" id="memberMobile" readonly="readonly" value="${storeReserve.member.mobile}"/>
			</div>
		</c:if>
		<div data-role="fieldcontain">
			<label for="reason">预约内容:</label>
			<form:textarea path="reason" readonly="true" htmlEscape="false" maxlength="128"/>
		</div>
	</form:form>
</body>
</html>
